/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:48 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class DanhmuccauhoiEntity
    {
        public DanhmuccauhoiEntity()
        {
			m_pk_idanhmuccauhoiid=0;
			m_stendanhmuccauhoi="";
        }
		private Int16 m_pk_idanhmuccauhoiid;
		public Int16 PK_iDanhmuccauhoiID
		{
			get { return m_pk_idanhmuccauhoiid ; }
			set { m_pk_idanhmuccauhoiid = value; }
		}
		private String m_stendanhmuccauhoi;
		public String sTendanhmuccauhoi
		{
			get { return m_stendanhmuccauhoi ; }
			set { m_stendanhmuccauhoi = value; }
		}

        #region Comparison
        public static List<DanhmuccauhoiEntity> Sort(List<DanhmuccauhoiEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(DanhmuccauhoiEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<DanhmuccauhoiEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<DanhmuccauhoiEntity> COMPARISON_PK_iDanhmuccauhoiID
		{
			get
			{
				return delegate(DanhmuccauhoiEntity entity,DanhmuccauhoiEntity other)
				{
					return entity.PK_iDanhmuccauhoiID.CompareTo(other.PK_iDanhmuccauhoiID);
				};
			}
		}
		public static Comparison<DanhmuccauhoiEntity> COMPARISON_sTendanhmuccauhoi
		{
			get
			{
				return delegate(DanhmuccauhoiEntity entity,DanhmuccauhoiEntity other)
				{
					return entity.sTendanhmuccauhoi.CompareTo(other.sTendanhmuccauhoi);
				};
			}
		}
        #endregion
    }
}
